import { getBannerList } from "@/apis/Home";

import { onMounted, ref } from "vue";

export const useBanner = () => {
  //获取轮播图
  const bannerList = ref([]);
  const getBanner = async () => {
    const {
      data: { result }
    } = await getBannerList({
      distributionSite: "2",
    });
    bannerList.value = result;
  };

  onMounted(() => getBanner());
  return {
    bannerList
  };
};
